package main

import "fmt"

func main() {
	fmt.Println("请输入一个值：")
	var s1 string
	scan, err := fmt.Scan(&s1)
	if err != nil {
		return
	}

	fmt.Println(scan)
	fmt.Println(s1)

	var (
		name string
		age  int
	)

	_, err = fmt.Scanf("%s, %d\n", name, age)
	if err != nil {
		return
	}

	fmt.Println(name)
	fmt.Println(age)
}
